package com.strato.admin.resource.v1_0_0.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.osgi.framework.Bundle;

import com.strato.base.env.v1_0_0.GlobalEnvironment;
import com.strato.mvc.annotation.v1_0_0.annotation.method.RequestMapping;
import com.strato.mvc.annotation.v1_0_0.annotation.type.Controller;
import com.strato.mvc.api.v1_0_0.control.StaticResource;

@Controller
@com.strato.mvc.annotation.v1_0_0.annotation.type.RequestMapping("${strato.admin.url.prefix}")
public class ResourceController {
	@RequestMapping("/css/**")
	public void css(HttpServletRequest request,HttpServletResponse response,Bundle bundle){
		StaticResource.delegateToWebApp(request, response, bundle,GlobalEnvironment.getInstance().resolveString("${strato.admin.url.prefix}"));
	}
	
	@RequestMapping("/js/**")
	public void js(HttpServletRequest request,HttpServletResponse response,Bundle bundle){
		StaticResource.delegateToWebApp(request, response, bundle,GlobalEnvironment.getInstance().resolveString("${strato.admin.url.prefix}"));
	}
	
	@RequestMapping("/images/**")
	public void images(HttpServletRequest request,HttpServletResponse response,Bundle bundle){
		StaticResource.delegateToWebApp(request, response, bundle,GlobalEnvironment.getInstance().resolveString("${strato.admin.url.prefix}"));
	}
	
	@RequestMapping("/fonts/**")
	public void fonts(HttpServletRequest request,HttpServletResponse response,Bundle bundle){
		StaticResource.delegateToWebApp(request, response, bundle,GlobalEnvironment.getInstance().resolveString("${strato.admin.url.prefix}"));
	}
}
